package global

import (
	"github.com/go-redis/redis/v7"
	"github.com/gorilla/websocket"
	"gorm.io/gorm"
)

var (
	Db          *gorm.DB
	RedisClient *redis.Client
	ClientMap   = map[string]Node{}
)

type Response struct {
	Code    int
	Message string
	Data    map[string]interface{}
}

type Node struct {
	Conn *websocket.Conn
	Data chan []byte
}

type Message struct {
	UserId  string
	ObjId   string
	Message string
}

type TextExam struct {
	Context     string
	MessageType string
}

type TextExample struct {
	Context string
}
